package com.econ.powercloud.ems.service.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.econ.powercloud.ems.dal.entity.ExtIotViceConfig;
import com.econ.powercloud.ems.dal.mapper.ExtIotViceConfigMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ Description:
 * @ Author：hgp
 * @ Create:2022-05-23-17:03
 */
@Repository
public class ExtIotViceConfigDAO extends ServiceImpl<ExtIotViceConfigMapper, ExtIotViceConfig> {

    public List<ExtIotViceConfig> selectByTableIdAndApp(String applicationCode, Integer tableId) {
        LambdaQueryWrapper<ExtIotViceConfig> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(ExtIotViceConfig::getApplicationCode,applicationCode);
        wrapper.eq(ExtIotViceConfig::getTableId,tableId);
        return this.baseMapper.selectList(wrapper);
    }
}
